#include <stdio.h>


int main (int argc, const char * argv[]) {
	int c, pc = EOF;
	while ((c = getchar()) != EOF) {
		if (!(c == ' ' && pc == ' '))
			putchar(c);
		pc = c;
	}
	return 0;
}
